using System;
using System.Globalization;

namespace Prometheus.Binding.ReadOnly.BaseConverters
{
    public class proTrimStringConverter : proChainConverter
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null) return null;
            return ((string) value).Trim();
        }

        public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}